﻿
Namespace Compiler.Semantic
    Public Class QualifierBinder
        Inherits Binder

        Private m_qualifier As Qualifier
        Public Property Qualifier() As Qualifier
            Get
                Return m_qualifier
            End Get
            Set(ByVal value As Qualifier)
                m_qualifier = value
            End Set
        End Property

        Public Sub New(ByVal qualifier As Qualifier)
            m_qualifier = qualifier
        End Sub

        Public Overrides Function Equals(ByVal other As Binder) As Boolean
            If other Is Nothing Then Return False
            If Not TypeOf other Is QualifierBinder Then Return False

            Dim typedOther As QualifierBinder = TryCast(other, QualifierBinder)

            If typedOther.m_qualifier.Equals(m_qualifier) Then
                Return True
            Else
                Return False
            End If
        End Function

        Public Overrides Function GetHashCode() As Integer
            Return m_qualifier.GetHashCode()
        End Function
    End Class
End Namespace